EWS | How to query CAS to get EWS asmx urls

Hi 

We have a requirement to get schedules for the users using EWS url. The client that we work for is a global client with multiple exchange servers (i.e. per country). How can I get EWS URL based on email address of a user? I tried example "Exchange 2013 Validate Autodiscover URLs by using validation callbacks" from Microsoft site but it takes long time to return the EWS URL and this being web application, page might time out if user wants to see schedule for 4 - 5 other users belonging to 4 or 5 different country. 

Another way which was suggested was querying CAS array. But how to query CAS programmatically? 

Can anyone please help?

Regards,

RK

April 7th, 2015 12:11pm

Hi Radhakrishna,

The right way to do this is to use AutoDiscover to get the EWS URL.  However, we recommend you call AutoDiscover every 24 hours, cache the EWS URL returned by AutoDiscover and use it for 24 hours.  Also, if EWS subscription call fails with the error that subscription for a notification can't be found,  or that mailbox has moved, you should run AutoDiscover since the mailbox may now be accessed through another EWS URL.  Hope this helps.

Thanks,

Venkat

Free Windows Admin Tool Kit Click here and download it now
April 7th, 2015 12:43pm

Hi Radhakrishna,

The right way to do this is to use AutoDiscover to get the EWS URL.  However, we recommend you call AutoDiscover every 24 hours, cache the EWS URL returned by AutoDiscover and use it for 24 hours.  Also, if EWS subscription call fails with the error that subscription for a notification can't be found,  or that mailbox has moved, you should run AutoDiscover since the mailbox may now be accessed through another EWS URL.  Hope this helps.

Thanks,

Venkat

April 7th, 2015 4:41pm

Thanks Venkat, for your reply. we will proceed as suggested.
Free Windows Admin Tool Kit Click here and download it now
April 8th, 2015 9:57am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics